perm filename INTOPS.PAL[AL,HE]15 blob
sn#381312 filedate 1978-09-20 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 .SBTTL Table of interpreter instructions
C00014 ENDMK
C⊗;
.SBTTL Table of interpreter instructions
COMMENT ⊗
This table is parallel to the file INTDEF.SAI[AL,HE]. It is required
at several places in the interpreter; each of these can define the
macro MAKEOP however desired. The convention here for types of
arguments that each pseudo-op takes is this:
a absolute address
la list of absolute addresses
o offset or level-offset pair
lo list of offsets or level-offset pairs
n,t small constants
r50 word of radix 50
NOTE: File INTARG.PAL[AL,HE] (used in ALAID) is also parallel to this file and
should be changed accordingly when this file changes.
⊗
PCVERSION == 8 ;Fix this every time you add some new pcodes
II == 2 ;Start of interpreter jump table (0 is illegal instruction)
;Motion control
MAKEOP XMOVE,MOVE,<a,n> ;Prepare, execute move whose traj table is at a.
MAKEOP XCENTER,CENTER,<a,n>, ;Center using traj table at a. Using mech n.
MAKEOP XSTOP,STOP,<n> ;Cause all mechanisms whose bits are on in n to stop.
MAKEOP XTFRCST,TFRCST,<n> ;Initializes force system, force frame on stack
; control bits in <n>
MAKEOP XVMKFRC,VMKFRC ;Gets vector off stack, makes a force frame along vector
; and puts it on the stack
MAKEOP XCOMPLY,COMPLY,<n> ;Sets up compliant motion in next move
;Gets force magnitude off stack, control bits in <n>
MAKEOP XCMPOFF,CMPOFF,<n> ;Turns off compliant motion in current move (not used)
MAKEOP XNOTICE,NOTICE ;Make sure everyone knows where the arm is.
MAKEOP XFILL0,NOOP ;filler
;Variables
MAKEOP XMVAR,MVAR,<<t,n,...>> ;Make n variables of type t with possible
; optional arguments (list arg)
MAKEOP XKVAR,KVAR,n ;Kill last n environment entries
;Stack operations
MAKEOP XGTVAL,GTVAL,<o>;Push value of arg (level-offset pair).
MAKEOP XCHNGE,CHNGE,<o>;Pop value into arg (level-offset pair).
MAKEOP XPUSH, PUSHV,<a> ;Push arg directly (as a ptr) onto stack. For cnstnts.
MAKEOP XPOP, POPV ;Pop stack.
MAKEOP XCOPY, COPY ,<n>;Copy n'th down to top of stack.
MAKEOP XREPLAC,REPLAC,<n> ;Replace n'th down with top (which pop)
;Flow of control
MAKEOP XJUMP, JUMP, <a> ;Jump to address
MAKEOP XJUMPC,JUMPC,<a> ;Jump to address if "true"
MAKEOP XTERMINATE,TERMINATE ;Terminate this interpreter
MAKEOP XPROC, PROC,<a,lo> ;Call a procedure at a, with arg list lo
MAKEOP XRETURN,RETURN,<n> ;Return from procedure
MAKEOP XSPROUT,SPROUT,la ;Sprout interpreters at each arg, wait (list arg)
MAKEOP XFORCHK,FORCHK,<a> ;Do a FOR-loop check, and fail to location d.
;MAKEOP XFOREND,FOREND,<a> ;Increment FOR variable and jump to FORCHK at a
MAKEOP XCASE,CASE,<n,la> ;Does a regular case statement dispatch
MAKEOP XSIGNAL,SIGNAL,<o> ;Signal event at level-offset o.
MAKEOP XWAITE,WAITE,<o> ;Wait on event at level-offset o.
MAKEOP XPAUSE,PAUSE ;Pause in seconds (on stack)
MAKEOP XABORT,ABORT ;Abort current motions
MAKEOP XDDT,GODDT ;go to DDT.
MAKEOP XFILL1,NOOP ;filler
MAKEOP XPUSHSCI, PUSHSCI ;Push floating point scalar immediate
MAKEOP XINT,INT ;s ← INT s (integer part of)
;Affixment
MAKEOP XAFFIX,AFFIX,<o,o',n (,o")> ;Makes an affixement of type n between two
; frames at level-offsets o & o' (trans at o")
MAKEOP XUNFIX,UNFIX,<o,o'> ;Unfixes the two frames at level-offsets: o & o"
;Boolean
MAKEOP XSLE,SLE ;S≤S compare top two elts, pop, pop, push answer
MAKEOP XSLT,SLT ;S<S true := 1.0
MAKEOP XSGE,SGE ;S≥S false:= 0
MAKEOP XSGT,SGT ;S>S
MAKEOP XSEQ,SEQ ;S=S
MAKEOP XSNE,SNE ;S≠S
MAKEOP XAND,AND ;S∧S (logical and)
MAKEOP XLOR,LOR ;S∨S (logical or)
MAKEOP XNOT,NOT ;¬S (logical not) note: this only takes one arg
MAKEOP XXOR,LXOR ;S⊗S (logical exclusive or)
MAKEOP XEQV,EQV ;S≡S (logical equivalence)
;Arithmetic
MAKEOP XWHERE,WHERE,<n> ;Push the current location of mechanism n
MAKEOP XSADD, SADD ;S+S: Add top two elts, pop, pop, push answer
MAKEOP XSSUB, SSUB ;S-S: Sub top two elts, pop, pop, push answer
MAKEOP XSNEG, SNEG ;-S: Negate top elt, pop, push answer
MAKEOP XSMUL, SMUL ;S*S: Mul top two elts, pop, pop, push answer
MAKEOP XSDIV, SDIV ;S/S: Div top two elts, pop, pop, push answer
MAKEOP XSEXP,SEXP ;S↑S: Raise scalar to a power
MAKEOP XSABS,SABS ;|S|: Absolute value of a scalar
MAKEOP XVMAGN, VMAGN ;S ← norm of vector
MAKEOP XVDOT, VDOT ;S ← vector dot vector
;PVDOT ;S ← vector dot vector all 4 cells
MAKEOP XSSBRTN,SSBRTN,<n> ;S ← SBRTN[n](top scalar elt)
MAKEOP XTMAGN,TMAGN ;S ← extracts angle of rotation from trans
MAKEOP XTAXIS,TAXIS ;V ← extracts axis of rotation from trans
MAKEOP XVMAKE,VMAKE ;V ← vector(scalar,scalar,scalar)
MAKEOP XSVMUL,SVMUL ;V ← scalar * vector
MAKEOP XVSDIV,VSDIV ;V ← vector / scalar
MAKEOP XVADD, VADD ;V ← vector + vector
MAKEOP XVSUB, VSUB ;V ← vector - vector
MAKEOP XUNITV,UNITV ;Vector ← vector / its norm
MAKEOP XVCROSS,CROSV ;Vector ← vector cross vector
MAKEOP XTVMUL,TVMUL ;Vector ← trans * vector
MAKEOP XTPOS,TPOS ;Vector ← translation_part_of_trans
MAKEOP XTORIEN,TORIEN ;T ← rotation_part_of_trans
MAKEOP XVSAXWR,VSAXWR ;T ← rotation(vector,angle)
MAKEOP XTMAKE,TMAKE ;T ← trans(rot,vector)
MAKEOP XTVADD,TVADD ;T ← t + v
MAKEOP XTVSUB,TVSUB ;T ← t - v
;FTOF ;T ← INV(t1) * t2 done by TTMUL(TINVRT(t1),t2) in pcode
MAKEOP XTTMUL,TTMUL ;T ← trans * trans
MAKEOP XTINVRT,TINVRT ;T ← inverse(trans)
MAKEOP XCONSTR,CONSTR ;T ← construct(v,v,v)
MAKEOP XMAX,MAX ;s ← s MAX s
MAKEOP XMIN,MIN ;s ← s MIN s
MAKEOP XIDIV,IDIV ;s ← INT(INT(s)/INT(s))
MAKEOP XMOD,MOD ;s ← s MOD s
;Condition monitors
MAKEOP XCMENBL,CMENBL,<o> ;Enable c-m at level-offset o
MAKEOP XCMDSBL,CMDSBL,<o> ;Disable c-m at level-offset o
MAKEOP XCMTRIG,CMTRIG ;Trigger the c-m body (use only in checker)
MAKEOP XCMSKED,CMSKED,<n> ;Sleep for n mills (use only in checker)
MAKEOP XCMUNCR,CMUNCR ;Start uncritical section
MAKEOP XCMDONE,CMDONE ;Ends force/hardware/duration c-m's, if c-m was
; re-enabled then restarts it, else dismisses it
MAKEOP XCMFORCE,CMFORCE ;Initialize force sensing - vector & level on stack
MAKEOP XCMSENSE,CMSENSE ;Initialize hardware sensing
MAKEOP XCMDUR,CMDUR ;Wait for set time, then start up c-m
MAKEOP XFILL8,NOOP ;filler (for hardware cmons?)
MAKEOP XFILL9,NOOP ;filler (for hardware cmons?)
;Initialization
MAKEOP XPROG,PROG ;Initialize mechanism variables
MAKEOP XENDP,ENDP ;Clean up mechanism variables
;Input/Output
MAKEOP XPROMPT,PROMPT ;Wait for a "P" on VT05 before proceeding
MAKEOP XSCALRD,SCALRD ;Read in a scalar from the terminal
MAKEOP XPRINT,PRINT ;Type an ASCIZ string on the VT05.
MAKEOP XVALPRN,VALPRN ;Type a value, whatever type it is, and pop it.
MAKEOP XVARPRN,VARPRN,<o> ;Type a variable (level-offset), whatever type.
MAKEOP XQUERY,QUERY ;Read in a boolean from the VT05 - either "Y" or "N"
MAKEOP XFIL10,NOOP ;filler
MAKEOP XFIL11,NOOP ;filler
;Debugging aids
MAKEOP XBRACE,BRACE ;Bracepoint in the program (break or trace)
MAKEOP XNOOP,NOOP ;Null operation
MAKEOP XTOPAL,TOPAL ;Escape to PAL
;Temp hacks for debugging force wrist
MAKEOP XSETBAS,SETBAS ;Zero wrist callibration matrix
MAKEOP XWRIST,WRIST,<o> ;Store 6 force components in array o
;following added by MSM to get at new POINTY routines
MAKEOP XRETSC,NOOP,<o> ;Return a scalar value in data array
MAKEOP XRETVT,NOOP,<o> ;Return a vector value in data array
MAKEOP XRETRT,NOOP,<o> ;Return a rot value in data array
MAKEOP XRETTR,NOOP,<o> ;Return a trans value in data array
MAKEOP XWREAD,NOOP ;Wrist reading routine